﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace GFC
{
    [Serializable]
    public class FieldDependantFrame : Frame
    {
        private string m_DependancyFieldName;

        private FieldDependantFrame()
        {
        }

        public FieldDependantFrame(string name, Format format, string dependancyFieldName) :
            base(name, format)
        {
            this.m_DependancyFieldName = dependancyFieldName;
        }

        public string DependancyFieldName
        {
            get { return m_DependancyFieldName; }
        }

        public override bool Equals(object obj)
        {
            FieldDependantFrame frame = obj as FieldDependantFrame;
            if(frame == null)
                return false;
            return base.Equals(obj) && this.DependancyFieldName == frame.DependancyFieldName;
        }
    }
}
